package dinnerSimulation;

import java.awt.Point;


public class AgentCiccio extends AbstractAgent {


        public Point currentPosition;
        public int stepValue;   
        public boolean died;
        public int kValue;
        public boolean MEAL_READY = false;
        

        public boolean SUIT_UP= false;
        public boolean TAKE_MEAL = false;
        public boolean TABLE_READY = false;
        public boolean FLOWERS_TAKEN = false;
        public boolean ENTRANCE = false;
        
        public boolean cal, cal_suitUp, cal_takeFlow, cal_table_ready;
        


        public AgentCiccio(int x, int y, int opBound) {
                super(x, y, opBound);
                died = false;
                cal= cal_suitUp =cal_takeFlow = cal_table_ready = false;
        }

        public boolean isTAKE_MEAL() {
                return TAKE_MEAL;
        }

        public void setTAKE_MEAL(boolean tAKE_MEAL) {
                TAKE_MEAL = tAKE_MEAL;
        }

        public boolean isMEAL_READY() {
                return MEAL_READY;
        }

        public void setMEAL_READY(boolean mEAL_READY) {
                MEAL_READY = mEAL_READY;
        }

        public boolean isSUIT_UP() {
                return SUIT_UP;
        }

        public void setSUIT_UP(boolean sUIT_UP) {
                SUIT_UP = sUIT_UP;
        }

        public boolean isTABLE_READY() {
                return TABLE_READY;
        }

        public void setTABLE_READY(boolean tABLE_READY) {
                TABLE_READY = tABLE_READY;
        }

        public boolean isFLOWERS_TAKEN() {
                return FLOWERS_TAKEN;
        }

        public void setFLOWERS_TAKEN(boolean fLOWERS_TAKEN) {
                FLOWERS_TAKEN = fLOWERS_TAKEN;
        }

        public boolean isENTRANCE() {
                return ENTRANCE;
        }

        public void setENTRANCE(boolean eNTRANCE) {
                ENTRANCE = eNTRANCE;
        }



        @Override
        public boolean subGoal1Reached() {
                // TODO Auto-generated method stub
                return isMEAL_READY();
        }
        
        @Override
        public void clearSubGoals() {
                // TODO Auto-generated method stub
                 MEAL_READY = false;
                SUIT_UP= false;
                TAKE_MEAL = false;
                TABLE_READY = false;
                FLOWERS_TAKEN = false;
                ENTRANCE = false;
        }


        @Override
        public boolean subGoal2Reached() {
                // TODO Auto-generated method stub
                return isSUIT_UP();
        }

        @Override
        public boolean subGoal3Reached() {
                // TODO Auto-generated method stub
                return TABLE_READY;
        }

        @Override
        public boolean subGoal4Reached() {
                // TODO Auto-generated method stub
                return FLOWERS_TAKEN;
        }

        @Override
        public boolean subGoal5Reached() {
                // TODO Auto-generated method stub
                return ENTRANCE;
        }

        /**
         * @return true if the agent has reached the goal
         */
        public boolean goalReached(){
                return goalReached;
        }
        
        

        /** 
         * Make the agent perceives from environment
         * @param       perception      current perception from the environment
         */
        public void perceives(Perception perception){
                this.perception = perception;
                // TODO show perception
        }

        @Override
        public void update() {
                // TODO Auto-generated method stub
                
        }

        @Override
        public void initialPos() {
                // TODO Auto-generated method stub
                
        }

        /**
         * Print the list of agent actions 
         */
        public void showActions(){
                for(int i=0; i<actionList.size(); i++)
                        System.out.println(actionList.get(i).type);
        }
        
        /**
         * Add the current action to the agent action list
         * @return current action of the agent
         */
        public Action.Type action(){
                actionList.add(new Action(currAction, x, y));
                return currAction;
        }

        public void setStepValue(int stepValue) {
                this.stepValue = stepValue;
                energy = stepValue;
                
        }
        
        public void setKValue(int kValue) {
                this.kValue = kValue;
        //      energy = kValue;
                
        }

        @Override
        public void setCurrentPosition(int room, int pos) {
                // TODO Auto-generated method stub
                
        }

        public int stepValue(){
        	return this.stepValue;
        }
        
        
        
        

}
